package com.zjuh.taofood.web.action;

import wint.mvc.flow.FlowData;
import wint.mvc.template.Context;
import wint.tools.redis.RedisClient;

import com.zjuh.taofood.web.common.BaseAction;

public class RedisTest extends BaseAction {

	private RedisClient redisClient;
	
	private int namespace = 123456;
	
	public void execute(FlowData flowData, Context context) {
		String testKey = "hsl_test_incr_key";
		Long value = redisClient.incr(namespace, testKey);
		redisClient.expire(namespace, testKey, 3600);
		context.put("value", value);
	}


	public void setRedisClient(RedisClient redisClient) {
		this.redisClient = redisClient;
	}
	
}
